package com.example.administrator.jiangsu2021_3;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class setting extends AppCompatActivity {
    private Button btn_save;
    private EditText et_lightmax;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);
        btn_save=findViewById(R.id.btn_save);
        et_lightmax=findViewById(R.id.et_lightmax);

        btn_save.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                SaveandGet.save(et_lightmax.getText().toString(),setting.this);
                Intent intent=new Intent(setting.this,MainActivity.class);
                startActivity(intent);
            }
        });
    }
}
